<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="template/main.xhtml">

	<ui:define name="title">
	    نتائج البحث
	</ui:define>

	<ui:define name="content">
		<div class="content">
			<div class="article-container">
				<h3>نتائج البحث</h3>
				
				<div class="article-separator"></div>
				
				<div class="pdf-links">
					<h:form id="resultsForm">
						<p:dataTable id="dt" value="#{searchBean.resultLinks}" var="link"  styleClass="data-table">
							<p:column headerText="الروابط" id="c1">
								
								<p:commandLink id="cl1" ajax="false" value="#{link.title}" action="#{appSessionBean.openPage(link.URL)}" 
									rendered="#{link.type == '1'}"/>
								
								<p:commandLink id="cl2" ajax="false" value="#{link.title}" action="#{appSessionBean.openServicePage(link.serviceId)}" 
											rendered="#{link.type == '2'}" />
								
							</p:column>
						</p:dataTable>
					</h:form>
				</div>
				
			</div>
			<div class="clear-floating"></div>
			
		</div>
		
	</ui:define>
	
</ui:composition>
</html>